package com.qbw.app.model;

import androidx.databinding.Bindable;

import com.qbw.app.BR;
import com.qbw.app.R;

import java.io.Serializable;

/**
 * @author QBW
 * @date 2019-09-01
 */
public class ProblemStatus extends BaseModel implements Serializable {
    public static final String NORMAL = Voltage.NORMAL;
    public static final String NO_DATA = Voltage.NO_DATA;
    private String vehicleCode;
    private int faultCount;
    private String state = NO_DATA;
    private Vehicle mVehicle;
    private int value; // 故障数量

    public String getVehicleCode() {
        return vehicleCode;
    }

    public void setVehicleCode(String vehicleCode) {
        this.vehicleCode = vehicleCode;
    }

    @Bindable
    public int getFaultCount() {
        return faultCount;
    }

    public void setFaultCount(int faultCount) {
        this.faultCount = faultCount;
        notifyPropertyChanged(BR.faultCount);
    }

    public int getStatusDrawable() {
        return R.drawable.problem_normal;
    }

    @Bindable
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
        notifyPropertyChanged(com.qbw.app.BR.state);
    }

    public Vehicle getVehicle() {
        return mVehicle;
    }

    public void setVehicle(Vehicle vehicle) {
        mVehicle = vehicle;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }
}
